package days9.staffing_system;

/**
 * @Author fengzihao
 * @Date 2024-04-23 20:16
 */
public abstract class BaseStaff {
    private String name;
    private int id;
    private double salary;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public abstract void work();

    public void printStaff(){
        System.out.println(this.toString());
    }

    @Override
    public String toString() {
        return "BaseStaff{" +
                "name='" + name + '\'' +
                ", id=" + id +
                ", salary=" + salary +
                '}';
    }
}
